#include "processBar.h"
#include <string.h>
#include <unistd.h>

const char *lable = "|/-\\";


void processBar()
{
    int cnt = 0;
    int len = strlen(lable);
    char arr[NUM];
    memset(arr, '\0', sizeof(arr));
    while(cnt<=100)
    {
        printf("[%-100s][%d%%][%c]\r", arr, cnt, lable[cnt%len]);
        arr[cnt++] = TYPE;
        if(cnt<100)
            arr[cnt] = '>';
        fflush(stdout);
        usleep(100000);
    }
    printf("\n");
}



